package main

import (
	"fmt"
	"os"
	//"bytes"
)

func main() {
	/**
	 *  read  example.txt content as :
	 * 	hello world
	 *  中文
	 */
	fp, _ := os.Open("example.txt")
	bf := make([]byte, 100)
	defer fp.Close()
	fmt.Println(fp.Read(bf))
	fmt.Println(bf[:len(bf)])
	fmt.Println(string(bf))
  	/**
	 *  write content as  :
	 *  中文 世界
	 *  I am programmer
	 * as example1.txt
	 */
	 f2,_ := os.Create("example1.txt")
	 f2.WriteString("中文 世界\nI am programmer\n")
}
